<?php
use Mirage\Web;
//require_once Web::app()->getBasePath() . '/vendor/Smarty-3.1.8/libs/Smarty.class.php';
require_once Web::app()->getBasePath() . '/vendor/Smarty-3.1.8/libs/SmartyBC.class.php';
/**
 * Description of ExtSmarty
 * Date Created Apr 12, 2012 10:52:32 PM
 * @package 
 * @author Bryan Salazar
 * 
 */
class ExtSmarty extends SmartyBC
{
    public $layout;
    
    public function render($view,$params=array()) 
    {
        foreach($params as $k =>$v)
            $this->assign($k, $v);
        
        $_content_ = $this->fetch($view);
        $this->assign('content', $_content_);
        $this->display($this->layout);
    }
    
    public function renderPartial($view,$params=array()) 
    {
        foreach($params as $k =>$v)
            $this->assign($k, $v);
        
        $this->display($view);
    }
}
